System And Method for Removing Noise From Measurement Data

ABSTRACT

System and/or methods for removing noise from measurement data are disclosed. For example, pressure measurements may be used to identify a flow regime using the derivative of each of the pressure measurements. A time window may be defined about each pressure measurement and numerous or even all pressure measurements within the time window may be used to calculate the pressure derivative of each pressure measurement. A least-squares method or a least-absolute-deviations method may be used to compute a pressure-derivative curve. The iteratively-reweighted least-squares method may be used to solve least-absolute-deviation problems to compute a pressure-derivative curve with enhanced smoothing.

BACKGROUND

To obtain hydrocarbons, a drilling tool is driven into the ground surface to create a wellbore through which the hydrocarbons are extracted. A typical system for drilling an oil or gas wellbore has a tubular drill pipe, known as a “drill string,” and a drill bit located at the lower end of the drill string. The drill string is suspended within the wellbore and may be formed by drill pipes joined together, a coiled tubing string, casing joined together, and/or combinations thereof.

During drilling, the drill bit is rotated to remove formation rock, and drilling fluid called “mud” is circulated through the drill string to remove thermal energy from the drill bit and remove debris generated by the drilling. A surface pumping system typically generates circulation of the mud by delivering the mud to the central passageway of the drill string and receiving mud from the annulus of the wellbore. More specifically, the circulating mud typically travels downhole through the central passageway of the drill string, exits the drill string at nozzles that are located near the drill bit and returns to the surface pumping system through the annulus of the wellbore.

One technique to rotate the drill bit involves applying a rotational force to the drill string at the surface of the wellbore to rotate the drill bit at the bottom of the drill string. Another technique to rotate the drill bit uses the mud flowing through the drill string to drive a downhole mud motor located near the drill bit. The mud motor responds to the mud flow to produce a rotational force that turns the drill bit.

The drilling of the wellbore may relate to operations to install segments of a casing string which lines and supports the wellbore. More specifically, the drilling and casing installation operations may involve the following repetitive sequence: a particular segment of the wellbore is drilled; then, a casing section is inserted and cemented into the newly drilled segment of the wellbore; and then the drilling of the next segment of the wellbore begins. Moreover, downhole pressure may be interpreted to analyze the hydrocarbon presence in the formation. Therefore, measuring and monitoring of the downhole pressure is instrumental to the drilling process for hydrocarbons.

One of the most significant advancements in well test interpretation has been the pressure derivative. The pressure derivative is the starting point for reservoir flow-regime identification. The pressure derivative is also invaluable for diagnosing hardware problems, wellbore-induced anomalies, and pressure gauge problems. The pressure derivative provides the basis for modern well test interpretation methodology and has become a common feature in well test interpretation software. In many situations, however, the derivative of the measured data is not capable of being interpreted or, worse, misinterpreted by the analyst because of various artifacts of the measuring and differentiating process collectively termed “noise”. Considerable research has been applied to reducing the noise in the derivative plot, and a wide variety of smoothing methods have been proposed. For example, Bourdet et al., (See e.g. Bourdet, D., Whittle, T. M., Douglas, A. A., and Pirard, Y. M. 1983. A New Set of Type Curves Simplifies Well Test Analysis. World Oil 196: 95-106; and Bourdet, D., Ayoub, J. A., and Pirard, Y. M. 1989. Use of Pressure Derivative in Well Test Interpretation. SPEFE 4 [2]: 293-302; Trans., AIME, 287. SPE-12777-PA) has developed a method for smoothing the pressure derivative. Generally, the Bourdet method has been the standard in the industry since its introduction. However, the Bourdet method frequently fails to produce a usable derivative due to its ineffectiveness in removing noise in the measured pressure signal.

Over the years, other methods have been proposed that are primarily intended to provide a more “noise-free” derivative curve. For example, in U.S. Pat. No. 7,107,188, entitled “Digital Pressure Derivative Method and Program Storage Device,” issued on Sep. 12, 2006 to Veneruso et al. (which is hereby incorporated by reference in its entirety), a method is disclosed in which the input pressure signal is convolved with a wavelet to produce a derivative that is substantially free of noise. The principal difficulty with this method is that it requires input of many adjustable parameters by the user, most of which are not intuitive. Therefore, a user may not have confidence in the results produced by this method.

The current practice is to use centuries-old techniques for interpolating data tables (backward, forward, or central difference typically utilizing three points). When viewed in the frequency domain, these techniques exaggerate high frequency noise and distort the “true” dp/dt curve. The data are then typically smoothed by choosing the points used in the calculation a sufficient distance from the point of interest. This distance, defined as L, is expressed in terms of the appropriate time function. The idea of smoothing the derivative is considered somewhat unreliable due to the subjective choosing of L. If the value assigned to L is too large, the character of the actual signal will be distorted. Nevertheless, judging by the standard use of this method in commercial well testing software, it has become the most widely used.

Regardless of which method of numerical differentiation is used and regardless of the method used to reduce the scatter in the resulting derivative data, the result oftentimes is plagued with data that are not entirely representative of the well/reservoir system being analyzed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates a schematic diagram, including a cross-sectional view, of a formation testing tool with a probe in a vertical wellbore in accordance with embodiments of the present invention and which can be used in practicing embodiments of the method of the present invention.

FIG. 1B illustrates a schematic diagram, including a cross-sectional view, of a formation testing packer in a vertical wellbore in accordance with embodiments of the present invention and which can be used in practicing embodiments of the method of the present invention.

FIG. 1C illustrates a block diagram of electronic components of a formation testing tool that may be used in accordance with embodiments of the present invention and which can be used in practicing embodiments of the method of the present invention.

FIG. 2 illustrates a differentiation method using three consecutive data points.

FIG. 3 illustrates a differentiation method using a smoothing interval L.

FIG. 4 illustrates a differentiation method using smoothing intervals L₁ and L₂.

FIG. 5 illustrates a plurality of pressure measurements.

FIG. 6 illustrates a plurality of pressure measurements during a final pressure buildup.

FIG. 7 illustrates a plurality of pressure measurements over a five-minute duration.

FIG. 8A illustrates a buildup pressure derivative using the Bourdet method with L=0 (no smoothing).

FIG. 8B illustrates a buildup pressure derivative using a least-squares method with L=0 (no smoothing).

FIG. 9A illustrates a buildup pressure derivative computing using the Bourdet method where L=0.01.

FIG. 9B illustrates a buildup pressure derivative computed using a least-squares method where L=0.01.

FIG. 10A illustrates a buildup pressure derivative computed using the Bourdet method where L=0.05.

FIG. 10B illustrates a buildup pressure derivative computed using a least-squares method with L=0.05.

FIG. 11 illustrates pressure versus time during a final buildup with two outlier points added.

FIG. 12A illustrates a buildup pressure derivative curve using the Bourdet 3-point method where L=0.05.

FIG. 12B illustrates a buildup pressure derivative curve using least-squares method where L=0.05.

FIG. 12C illustrates a buildup pressure derivative curve using least-absolute-deviations method with L=0.05.

DETAILED DESCRIPTION OF THE DISCLOSURE

The present disclosure generally relates to a system and a method for removing noise from measurement data. More specifically, the present disclosure relates to a system and a method for accurately measuring downhole pressure in a wellbore by reducing the effects of artifacts or ‘noise’ in the pressure-derivative curve. Moreover, the system and the method may use the least-squares and least-absolute-deviations methods to calculate a pressure-derivative curve of pressure data gathered from a downhole tool.

Referring now to the drawings wherein like numerals refer to like parts, FIG. 1A and FIG. 1B schematically illustrate a wellbore system 10, which may be an on-shore wellbore or an off-shore wellbore system, in which the present systems and methods for analyzing dynamic data and/or estimating and/or determining pressure of a subsurface geological reservoir 14 (hereinafter “reservoir 14”) may be implemented.

A downhole tool 16 (hereinafter “tool 16”) may be lowered and/or run into the wellbore 12 and/or may extend downward into the wellbore 12. As a result, the tool 16 may be positioned within the wellbore 12 and/or may be located adjacent to one or more walls 18 (hereinafter “walls 18”) of the wellbore 12. In embodiments, the tool 16 may be a formation testing tool and/or may be configured to collect one or more measurements and/or data relating to one or more characteristics and/or properties associated with the wellbore 12, the walls 18 of the wellbore 12 and/or the reservoir 14. The tool 16 may be deployed via a wireline, slickline, a cable, coiled tubing, drill pipe or other types of conveyance as will be appreciated by ordinary skill in the art.

The measurements and/or data relating to characteristics and/or properties associated with the wellbore 12, the walls 18 of the wellbore 12 and/or the reservoir 14 may be used diagnostically to provide critical information about the reservoir 14. For example, a pressure gauge can be used to sense the pressure in the reservoir 14. That is, the pressure gauge can be used to sense the ‘reaction’ of the reservoir to a change in the flow rate. By measuring that ‘reaction’, one can determine a significant amount of information about the reservoir, such as the size of the reservoir, how much fluid is in the reservoir, the permeability of the reservoir, boundaries, and other important properties of the reservoir.

In embodiments, the tool 16 may be a wireline configurable tool which is a tool commonly conveyed in the wellbore 12 by wireline cable 15, such as, for example, a wireline cable 15 as known to one having ordinary skill in the art. For example, the wireline configurable tool may be a tool for formation testing, or a logging tool or testing tool for sampling or measuring properties and/or characteristics associated with the wellbore 12, the walls 18 of the wellbore 12 and/or the reservoir 14. It should be understood that the tool 16 may be any wireline configurable tool as known to one of ordinary skill in the art.

In embodiments, the tool 16 may be a tool configured to fluidly communicate with the reservoir 14 and/or wellbore 12 such as, a probe 20 as shown in FIG. 1A, a single-packer formation testing tool 26 as shown in FIG. 1B, a dual-probe formation testing tool or multi-probe formation testing tool or a dual-packer formation testing tool (not shown in the drawings), and/or any combination thereof.

FIG. 1A shows a tool 16 having a probe 20 that may be extended outwardly from the tool 16 towards the walls 18 of the wellbore 12 and/or the reservoir 14. The probe 20 can provide fluid communication between the reservoir 14 and/or the wellbore 12 and the tool 16. As a result, the probe 20 may abut or contact the walls 18 of the wellbore 12 and/or may penetrate and/or extend into the walls 18 of the wellbore 12. It should be understood that the tool 16 may include any number of probes as known to one of ordinary skill in the art.

FIG. 1B shows the tool 16 having a single-packer tool 26 configured to fluidly communicate with the reservoir 14 in embodiments of the disclosure. The single-packer tool 26 may expand or inflate from a first position having a first diameter to a second position having a second diameter greater than the first diameter. If inflated, the single-packer tool 26 may seal against the walls 18 of the wellbore 12 to isolate a first portion of the wellbore 12 from a second portion of the wellbore 12. Moreover, the tool 16 may conduct, execute and/or complete one or more downhole tests, such as, for example, a local production test, a buildup test, and and/or an interference test. The interference test may include an interval pressure transient test (hereinafter “IPTT test”) and/or a vertical interference test.

A port 24 on the packer element 26 may obtain formation fluid from the reservoir. The tool 16 may measure data associated with, for example, transient flow regimes of the reservoir 14. The tool 16 may be configured and/or adapted to collect and/or measure reservoir pressure and/or to establish hydraulic communication between the tool 16 and the walls 18 of the wellbore 12 and/or the reservoir 14. The tool 16 may have one or more sensors to measure pressure data.

The tool 16 may be, for example, a formation testing tool incorporated into a tool string which may have been deployed or run into the wellbore 12 during a formation test, such as, for example, a pressure test, an IPTT test, or other formation test. During an IPTT test, the tool 16 may be configured and/or adapted to collect, test and/or evaluate one or more formation characteristics and/or properties associated with the reservoir 14, such as formation pressure data and/or permeability distributions data for the reservoir 14. The tool 16 may measure and/or may collect dynamic data, such as, for example, pressure data which may represent one or more local pressure measurements at one or more locations within the wellbore 12 which may be traversing the reservoir 14. One or more characteristics and/or properties associated with the wellbore 12, the walls 18 of the wellbore 12 and/or the reservoir 14 may be evaluated, measured, determined and/or calculated based at least in part on the collected dynamic data and/or in part on the input data.

The tool 16 may detect, measure and/or collect one or more measurements and/or data relating to one or more characteristics and/or properties associated with the wellbore 12, the walls 18 of the wellbore 12 and/or the reservoir 14. The measurements obtained may be, but are not limited to, pressure, flow rate, density, viscosity and velocity. As shown in FIG. 1C, the tool 16 may communicate with the surface equipment, such as, for example, a surface system processor 104 (hereinafter “processor 104”) located at the Earth's surface 11 via wellbore telemetry. The wellbore telemetry may have, for example, wireline telemetry, mud pulse telemetry, acoustic telemetry, electromagnetic telemetry, wire-drill pipe telemetry and/or real-time bidirectional drill string telemetry and combinations thereof. The processor 104 may be located locally or remotely with respect to the wellbore system 10. The processor 104 may be located in a remote location with respect to the wellbore system 10, such as, for example, a testing lab, a research and development facility and/or the like. It should be understood that the type of wellbore telemetry utilized by the telemetry device may be any type of telemetry capable of communicating and/or sending data and/or information from the tool 16 to the processor 104 as known to one of ordinary skill in the art.

Software and/or one or more computer programs may be stored in a memory 102 connected to and/or in electronic communication with the tool 16. The software and/or one or more computer programs may be executed by the tool 16 to compress and/or process the measurements and/or data. The software may compress data and/or information collected by the tool 16 before transmitting the compressed data uphole to the processor 104 at the Earth's surface 11. The memory 102 may also be located at the Earth's surface 11. The measurements and/or data may be sent uphole to the Earth's surface 11 to be processed and/or analyzed.

The data may be processed and/or analyzed by the processor 104 and/or with the software to reconstruct, process, analyze, estimate and/or determine the measurements and/or data collected. The processed, analyzed, reconstructed, estimated and/or determined measurements and/or data collected and/or tested by the probe 20 or single-packer 26 of the tool 16 may be accessible and/or viewable by an operator at the Earth's surface 11 via a display 106, which may be connected to and/or in data communication with the processor 104 and/or the memory 102.

Thus, the tool 16 may be configured and/or may be adapted to conduct and/or to execute a drawdown test and/or a buildup test. During a drawdown test a seal is made between the probe 20 or the single-packer 26 and the reservoir 14, and fluid communication is established. Fluid from the reservoir 14 is then drawn into the tool 16 by, for example, decreasing pressure in the tool 16. During the drawing of the fluid, pressure measurements can be obtained. The drawdown is completed when the fluid pumping into the tool from the reservoir 14 is ceased. A buildup portion of the test may begin. During the buildup test, fluid from the formation continues to enter the tool 16 at an ever-decreasing rate of flow until, given a sufficient time, the pressure in the flowline is the same as the pressure in the reservoir 14. During the buildup test, the tool 16 may measure, analyze, collect and/or determine pressure measurements using data collected by the probe 20 or single-packer 26 in the wellbore 12. As the pressure builds, one or more pressure measurements can be obtained. The pressure measurements obtained during the drawdown and buildup test can be obtained at predetermined time increments, such as every one-tenth of a second. In an embodiment, a multitude of the pressure measurements can be obtained. The data collected by the tool 16 and/or other tools may be analyzed. One example is described herein as formation pressure measurements. This example is intended to be a non-limiting example for explanatory purposes and should be understood by those having ordinary skill in the art as non-limiting. More specifically, the present disclosure describes analyzing pressure-derivative data to remove noise. The system and method described herein may be applicable to other types of data collected in a wellbore or in another environment.

In practice, Bourdet et al. have proposed that the pressure derivative may be computed using a 3-point central difference formula given by:

$\begin{matrix} {{\left( \frac{P}{x} \right)_{i} = {{\left( \frac{P_{i + j} - P_{i}}{x_{i + j} - x_{i}} \right)\left( \frac{x_{i} - x_{i - k}}{x_{i + j} - x_{i - k}} \right)} + {\left( \frac{P_{i} - P_{i - k}}{x_{i} - x_{i - k}} \right)\left( \frac{x_{i + j} - x_{i}}{x_{i + j} - x_{i - k}} \right)}}},} & {{Eq}.\mspace{14mu} 1} \end{matrix}$

where P is pressure, x is a time function (e.g., spherical-superposition time or radial-superposition time), and the points i−k, i, and i+j are as showing in FIG. 2. When consecutive points are used for the calculation of Eq. 1, k=1 and j=1. Note that Eq. 1 is applicable to irregularly spaced points as well as regularly spaced points. Special care must be taken when performing the calculation at the first point of the data (i=1), thus a two-point forward difference is used pursuant to the following equation:

$\begin{matrix} {{\left( \frac{P}{x} \right)_{1} = \left( \frac{P_{1 + j} - P_{1}}{x_{1 + j} - x_{1}} \right)},} & {{Eq}.\mspace{14mu} 2} \end{matrix}$

Similarly, at the end of the data (wherein i=n, where n is the total number of points), a two-point backward difference used pursuant to the following equation:

$\begin{matrix} {{\left( \frac{P}{x} \right)_{n} = \left( \frac{P_{n} - P_{n - k}}{x_{n} - x_{n - k}} \right)},} & {{Eq}.\mspace{14mu} 3} \end{matrix}$

The use of consecutive points for the derivative calculation often results in a very noisy curve that cannot be used for analysis. As noted by Bourdet et al., a resulting noisy curve is especially common when the points are acquired at a fast sampling rate because pressure variations become close to the resolution of the sensor. The sensor resolution is the smallest change that the tool and/or the sensor can detect in the quantity that is being measured. Bourdet et al. propose to reduce the noise effects by choosing the calculation points i−k and i+j to be sufficiently distant from point i, such that the pressure change between the points is meaningful. However, Bourdet et al. note that, if the points are chosen to be too distant from point i, the shape of the derivative curve is distorted. The minimum distance between the abscissa of the calculation points and that of point i is represented by L, and is referred to as the “differentiation interval” or “smoothing interval”. Thus, an increase in the value of L translates to more “smoothing”. When L=0, no smoothing is applied. L is expressed in terms of the function x as illustrated in FIG. 3.

The principal shortcoming of the method of Bourdet et al. is that, despite separating the calculation points by a distance of at least L on each side of point i, the computation still uses only the three selected points. Thus, any noise in the selected points is still retained in the computation. Therefore, improvement in reduction of signal-to-noise ratio is, at best, minimal. FIG. 4 shows this effect. Although the differentiation interval is nearly doubled from L₁ to L₂, no reduction in noise results.

Interpreters applying the method of Bourdet et al. may find that the size of L must be increased to an unrealistically large value to obtain a relatively smooth derivative curve. Another scheme to reduce the noise is to decimate the data before performing the computation; again, the result may be a distorted derivative curve that may lack essential features because of excessive decimation.

Assuming that the noise in the pressure data is truly random, as in those instances when noise is caused by the gauge resolution, then incorporating more points in the derivative computation should tend to cancel out the random fluctuations. That is, using more data points multiplies the amount of signal present in the result, and it also multiplies the noise. However, the signal increases at a higher rate, while the noise is random and tends to cancel, or at least grow at a much slower rate.

Therefore, when a differentiation interval L is used, instead of simply using the point i and the two end points, the disclosed systems and/or methods propose that all points in the interval i−k to i+j be used. The differentiation interval L may be established according to a time window. That is, when calculating pressure derivative, a time window of a given size may be defined about each pressure measurement. Thus, the time window may be defined about point i such that a plurality of measurements taken during the time window are used to compute the pressure derivative at point i. The size of the time window may be based on a function, such as, for example, a logarithmic function of time. The size of the time window may alternatively be equal throughout the test. The pressure measurements are taken with respect to time. A least-squares formula can be used to compute the derivative using all points in the interval. Letting m represent the point number, where m ranges from i−k to i+j, the central difference formula of Eq. 1 is replaced by:

$\begin{matrix} {{\left( \frac{P}{X} \right)_{i} = \frac{{\sum\; {X_{m}P_{m}}} - {\sum\; {X_{m}*{\sum\; {P_{m}\text{/}M}}}}}{{\sum\; X_{m}^{2}} - {\sum\; {X_{m}*{\sum\; {X_{m}\text{/}M}}}}}},} & {{Eq}.\mspace{14mu} 4} \end{matrix}$

where M=1+j+k. When beginning the calculation at the first point of the data set (where i=1), the forward difference formula of Eq. 2 may be replaced by Eq. 4 with m ranging from 1 to 1+j, and M=1+j. For the last point of the data (where i=n), the backward difference formula of Eq. 3 may be replaced by Eq. 4 with m ranging from n−k to n, and M=1+k.

FIG. 5 presents the pressure data 500 from a strain gauge during a ten-hour test of a low-mobility zone. The test has a pretest 510, extended pumpout period 520, and final buildup 530. FIG. 6 illustrates the pressure data 500 during the 1000-second final buildup 530 of the ten-hour test shown in FIG. 5. FIG. 7 displays the pressure data 500 over the final 5 minutes of buildup 535. FIG. 7 exhibits the typical resolution-banded pattern characteristic of the strain gauge, although the pressure is still building at about 0.1 psi/minute at the end of the period.

The buildup derivative computed with L=0 (no smoothing) is shown in FIG. 8A for the standard Bourdet et al. three-point method and in FIG. 8B for the disclosed modified method using least-squares. With no smoothing, consecutive points are used, and thus the two methods are nearly identical; the derivative curves 800A, 800B are dominated by a aliasing pattern of diagonal lines 810A, 810B. However, with a small amount of smoothing, L=0.01, the difference between the standard and least-squares methods becomes apparent. In FIG. 9A, the standard Bourdet et al. method produces an uninterpretable derivative 900A with horizontally-banded lines 910A. In FIG. 9B, the modified method produces a more uniform curve 900B, thus allowing for flow-regime identification. For example, the flow regime may be radial flow and/or spherical flow. In FIGS. 10A and 10B, the smoothing is increased further using an interval of L=0.05. The difference in appearance of the curve between FIGS. 10A and 10B highlights the difference between the standard and least-squares methods. The pressure-derivative curve 1000A of FIG. 10A computed using the standard Bourdet et al. method is still too noisy to diagnose a radial-flow signature at the end of the buildup 1010A. The curve 1000B of FIG. 10B, computed using the modified method, allows for identification of this flow regime 1020B, as evidenced by the stabilization of the derivative at the end of the buildup 1010B. A comparison of FIGS. 9B and 10A indicates that the least-squares method produces a derivative of similar quality as the standard Bourdet method, yet the least-squares uses a five-times smaller differentiation interval. A smaller differentiation interval is advantageous because a smaller differentiation interval reduces the likelihood of distortion in the derivative curve.

The method of least squares may be sensitive to outlying points in a data set. The sensitivity to outlying points is demonstrated by creating two outlier points 1101, 1102 in the buildup curve 1100 of FIG. 11. The pressure data are presented showing these outlier points. The first outlying point has been created by adding 10 psi to the measured pressure at thirty seconds into the buildup, while the second outlier has 10 psi subtracted from a point 600 seconds into the buildup.

FIG. 12A shows the resulting derivative curve 1200A from the Bourdet et al. three-point derivative where L=0.05. The method uses only three points regardless of the size of L so the existence of outlying data points 1101 and 1102 affects very few derivative points 1210A. However, the derivative curve 1200B from the least-squares method displayed in FIG. 12B shows that any outlying data points 1101 and 1102 affect a considerable range of derivative values 1210B. Thus, the flow regime 1220B may be difficult to identify.

The method of least absolute deviations (LAD) is a technique similar to least squares; however, the LAD method attempts to minimize the sum of absolute errors as opposed to the sum of square errors which is the basis for least squares. The LAD method is robust in that the LAD method is resistant to outliers. The LAD method is also known in the art as the least absolute errors or least absolute value method.

FIG. 12C displays the pressure derivative 1200C for the buildup computed using the LAD method with outlying data points added. The outlying data points have almost no effect on the derivative 1200C. The LAD derivative curve 1200C is comparable in quality to that of FIG. 10B, having been computed using the least-squares method with no-outlier data. The improved quality of the derivative curve 1200C allows the flow regime 1220C to be identified.

Unlike least-squares regression (e.g., Eq. 4), LAD regression does not have an analytical solution. Therefore, an iterative solution is required. The method of iteratively-reweighted least squares (IRLS) may be used (McCullagh, P. and Nelder, J. A; 1989; Generalized Linear Models, Second Edition; Chapman and Hall).

IRLS is generally used to minimize the least absolute error (as opposed to the least square error). Thus, IRLS may be used to solve a least absolute-deviations problem. The following example begins with the simple linear equation of the form: P=a+bX with data points (X_(i),P_(i)) observed from the wellbore, and setting i=1,n. The IRLS method proceeds with the following steps:

1) Initialize w_(i)=1 for i=1,n 2) For iteration k, where k=1,ITER_(max), compute:

$\begin{matrix} {{s_{1} = {\sum\limits_{i = 1}^{n}\; w_{i}}}{s_{2} = {\sum\limits_{i = 1}^{n}\; {w_{i}X_{i}}}}{s_{3} = {\sum\limits_{i = 1}^{n}\; {w_{i}X_{i}^{2}}}}{s_{4} = {\sum\limits_{i = 1}^{n}\; {w_{i}P_{i}}}}{s_{5} = {\sum\limits_{i = 1}^{n}\; {w_{i}X_{i}P_{i}}}}} & {{{Eqs}.\mspace{14mu} 5} - 9} \end{matrix}$

3) Solve for a and b:

a=(s ₄ s ₃ −s ₅ s ₂)/(s ₁ s ₃ −s ₂ s ₂)

b=(s ₅ s ₁ −s ₄ s ₂)/(s ₁ s ₃ −s ₂ s ₂)  Eqs. 10-11

4) If k<ITER_(max), then:

-   -   a) for i=1,n: set w_(i)=|(P_(i)−a−bX_(i))|.     -   b) for i=1,n: find the w_(min+), the minimum w_(i) that is         greater than 0; if all w_(i)=0 then go to step 5 (i.e., exit the         iteration loop of step 2 to 4).     -   c) for i=1,n: if w_(i)=0 then set w_(i)=10/w_(min+) else set         w_(i)=w_(i)/1.         5) Upon completion of the iteration loop of steps 2 to 4, the         value of b is the slope dP/dX.

The method may, for example, converge in three to five iterations. For the pressure derivative, experimentation has shown that setting ITER_(max)=3 may produce acceptable results. However, depending upon the application, a person of ordinary skill in the art will appreciate that more or less iterations may be used. Note that setting ITER_(max)=1 produces a result identical to conventional least squares.

In summation, the application of the commonly used Bourdet et al. method for smoothing the pressure derivative has been examined. The Bourdet et al. method has a weak ability to improve signal-to-noise ratio, because it relies on three points for the computation. Thus, a new method is proposed to enhance smoothing of the derivative. The disclosed method is proposed to compute the derivative using all points in a time window. The modification retains the simplicity of the Bourdet et al. method because a single adjustable parameter is still used. Application of the disclosed method achieves a significantly smoother derivative curve than the standard Bourdet et al. method. The proposed method may be implemented with a least-squares computation or a least-absolute-deviations computation. The examples disclosed herein demonstrate that the least-absolute-deviations method is more resistant to outlying data points. While an example described herein applied the techniques disclosed to a pressure buildup test, it is contemplated that the techniques may also be applied to a drawdown test, or any other downhole test for dynamically analyzing a wellbore.

Although exemplary systems and methods are described in language specific to structural features and/or methodological acts, the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as exemplary forms of implementing the claimed systems, methods, and structures. 

We claim:
 1. A method comprising: drawing reservoir fluid in a formation about a wellbore into a downhole tool; ceasing to draw the reservoir fluid into the downhole tool; obtaining pressure measurements with respect to time of the reservoir fluid after ceasing to draw the reservoir fluid into the downhole tool; defining a time window about a first pressure measurement of the pressure measurements; obtaining a derivative of the first pressure measurement with respect to time by utilizing the first pressure measurement, a plurality of the pressure measurements within the time window and obtained prior to the first pressure measurement, and a plurality of the pressure measurements within the time window and obtained after the first pressure measurement; and identifying a reservoir flow regime based on the derivative.
 2. The method of claim 1, wherein the derivative is determined using a least-squares method, a least-absolute-deviations method, or an iteratively-reweighted least-squares method.
 3. The method of claim 1, wherein the size of the time window varies for each pressure measurement.
 4. The method of claim 1, wherein the size of the time window is fixed.
 5. The method of claim 1, wherein the time window is based on a function of time change.
 6. The method of claim 5, wherein the function of time change is logarithmic.
 7. The method of claim 1, wherein all of the pressure measurements in the time window are used to obtain the derivative.
 8. A method comprising: drawing reservoir fluid in a formation about a wellbore into a downhole tool; ceasing to draw the reservoir fluid into the downhole tool; obtaining pressure measurements of the reservoir fluid with respect to time after ceasing to draw the reservoir fluid into the downhole tool; defining a time window about each of the pressure measurements; obtaining, for each of the pressure measurements, a derivative of a given pressure measurement of the pressure measurements with respect to time by utilizing the given pressure measurement, a plurality of the pressure measurements within the time window of the given pressure measurement and obtained prior to the given pressure measurement, and a plurality of the pressure measurements within the time window of the given pressure measurement and obtained after the given pressure measurement; and identifying a reservoir flow regime based on the derivative for each of the pressure measurements.
 9. The method of claim 8, wherein the derivative is calculated using a least-squares technique, a least-absolute-deviations technique, or an iteratively-reweighted least-squares technique.
 10. The method of claim 8, wherein the size of the time window varies based on a logarithmic function of time.
 11. The method of claim 8, wherein the size of the time window is equal for each pressure measurement.
 12. The method of claim 8 further comprising the steps of: determining a function indicative of the data points; and performing an iteration of a least-absolute-deviations problem to solve the function.
 13. The method of claim 12 further comprising a step of: performing one or more additional iterations until consecutive solutions are within a given range.
 14. The method of claim 8, wherein more than three pressure measurements are used in the derivative calculation.
 15. A method for computing a pressure derivative in a wellbore, the method comprising: drawing reservoir fluid in a formation about a wellbore into a downhole tool at a substantially constant rate; obtaining pressure measurements of the reservoir fluid with respect to time while drawing reservoir fluid into the downhole tool; defining a time window about each of the pressure measurements; obtaining, for each of the pressure measurements, a derivative of a given pressure measurement of the pressure measurements with respect to time by utilizing the given pressure measurement, a plurality of the pressure measurements within the time window of the given pressure measurement and obtained prior to the given pressure measurement, and by utilizing a plurality of the pressure measurements within the time window of the given pressure measurement and obtained after the given pressure measurement; and identifying a flow regime based on the derivative for each of the pressure measurements.
 16. The method of claim 15, wherein the derivative is determined using a least-squares method, a least-absolute-deviations method, or an iteratively-reweighted least-squares method.
 17. The method of claim 15, wherein the time window is determined using a time function.
 18. The method of claim 17, wherein the size of the time window is equal for each pressure measurement.
 19. The method of claim 15, wherein the flow regime is spherical or radial.
 20. The method of claim 15, wherein the size of the time window is equal for each pressure measurement. 